<template>
	<view class="main">
		<view class="content">
			<view class="">
				<view class="top" :style="{ paddingTop: systemInfo.titleTop + 'px' }">
					<view class="main-title" :style="{ height: systemInfo.sBarHeight + 'px', 'line-height': systemInfo.sBarHeight + 'px' }">
						{{ type == 1 ? '提交成功' : '审核失败' }}
					</view>
				</view>
			</view>
			<view class="b" v-if="type == 1">
				<image src="/static/ok.png" mode="aspectFill"></image>
				<view class="one">入职申请信息已提交</view>
				<view class="two">您的入职申请已提交，等待后台审核~</view>
			</view>
			<!-- v-if="type == 3" -->
			<view class="b" v-if="type == 3">
				<image src="/static/no.png" mode="aspectFill"></image>
				<view class="one">抱歉，您的入职申请未通过</view>
				<view class="two" v-if="userInfo.rejectReason">您提交的信息{{ userInfo.rejectReason }}请您修改后重新提交</view>
				<view class="btn" @click="update">去修改</view>
			</view>
		</view>
	</view>
</template>

<script setup>
import { ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app';

import { getUserInfo } from '@/api/apiList';

const userInfo = ref({});
const getUser = async () => {
	const userRes = await getUserInfo();
	if (userRes.code == 200) {
		userInfo.value = userRes.data;
	}
};

let type = ref('');
onLoad((option) => {
	type.value = option.type;
	getUserInfo();
});
let ok = ref(false);

const capsule = uni.getStorageSync('capsule');
let systemInfo = uni.getStorageSync('systemInfo');

const update = () => {
	uni.reLaunch({
		url: '/pages/index/index?type=1'
	});
};
</script>

<style>
/* page {
	height: 100%;
	background: linear-gradient(180deg, #2b77ff 0%, #f9f9f9 45%);
} */
</style>

<style lang="scss" scoped>
.main {
	height: 100%;
	background: #ffffff;
}
.content {
	padding: 0 32rpx;
}
.main-title {
	font-family: Source Han Sans, Source Han Sans;
	font-weight: 500;
	font-size: 36rpx;
	color: #3d3d3d;
}
.b {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	image {
		width: 100%;
		height: 700rpx;
	}
	.one {
		margin-bottom: 20rpx;
		font-family: Source Han Sans, Source Han Sans;
		font-weight: 500;
		font-size: 32rpx;
		color: #3d3d3d;
	}
	.two {
		font-family: Source Han Sans, Source Han Sans;
		font-weight: 400;
		font-size: 28rpx;
		color: #b6b6b6;
	}
	.btn {
		margin-top: 56rpx;
		width: 560rpx;
		height: 100rpx;
		background: #2b77ff;
		border-radius: 50rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		font-family: Source Han Sans, Source Han Sans;
		font-weight: 500;
		font-size: 28rpx;
		color: #ffffff;
	}
}
</style>
